// import { effects } from 'dva-core/saga';
import { message, Button } from 'antd';

export default {
  namespace: '$msg',
  state: {
    mainValue: 'Caroline',
  },
  reducers: {
    save(state, { payload }) {
      return Object.assign({}, state, payload);
    },
  },
  effects: {
    showToast({ payload }, { put, call, select }) {
      if (payload.type) {
        message[payload.type](payload.title);
      } else {
        message.error(payload.title);
      }
    },
  },
};
